package com.example.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;

/**
 * 网关服务主启动类
 */
@SpringBootApplication
@EnableZuulProxy  // 启用Zuul代理
@EnableDiscoveryClient  // 启用服务发现（可选）
public class GatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
        System.out.println("网关服务已启动，端口: 8080");
        System.out.println("路由配置:");
        System.out.println("  - 用户服务: http://localhost:8080/api/users/**");
        System.out.println("  - 商品服务: http://localhost:8080/api/products/**");
        System.out.println("  - 订单服务: http://localhost:8080/api/orders/**");
    }
}